from rest_framework.pagination import PageNumberPagination


class MyPageNumberPagination(PageNumberPagination):
    """
    自定义分页类
    """
    page_size = 2   # 每页展示的数量
    max_page_size = 10  # 最大页码数量
    page_size_query_param = 'size'  # ?page=xxx&size=??